const Dialog = (props) => {
  const { formData, setVisible } = props;
  const { http, username, password, mark } = formData;
  return (
    <div draggable={true}>
      <button className="dialog-close" onClick={() => setVisible(false)}>
        X
      </button>
      <form>
        <label>
          <h2 className="dialog-title">添加记录</h2>
        </label>
        <label htmlFor="">
            <span>平台</span>
            <input type="text" name='http' value={http}/>
        </label>
        <label htmlFor="">
          <span>账户</span>
          <input type="text" name='username' value={username}/>
        </label>
        <label htmlFor="">
          <span>密码</span>
          <input type="text" name='password' value={password} />
        </label>
        <label htmlFor="">
          <span>确认密码</span>
          <input type="text" name='mark' value={mark} />
        </label>
        <label htmlFor="">
          <span></span>
          <button type="button" onClick={()=>props.pushTable(false,formData)}>提交</button>
        </label>
      </form>
    </div>
  );
};
export default Dialog;
